import React, { Component } from 'react'
import bus from '@/MyEvents'

export default class Child1 extends Component {
  render() {
    return (
      <div style={{flexGrow:1,background:'springgreen',height:'100vh'}}>
        <h1>子组件1</h1>
        <button onClick={()=>{
            bus.emit('sendMsg',"白日依山尽")
        }}>发送</button>
      </div>
    )
  }
}
